<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-L-admin1.0</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
        <link rel="stylesheet" href="../css/font.css">
        <link rel="stylesheet" href="../css/xadmin.css">
        <script src="../js/jquery.min.js"></script>
        <script src="../lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="../js/xadmin.js"></script>
    </head>
    <body>
    <div class="x-body layui-anim layui-anim-up">
        <blockquote class="layui-elem-quote">欢迎您，
            <b><font size="4px">学生用户</font></b>：
            <span class="x-red" id="stuNameWel">请登录</span>！&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;本次登录时间:
            <a id="time">这里设置动态时间获取函数</a></blockquote>
        <fieldset class="layui-elem-field">
            <legend>您的相关信息：</legend>
            <div class="layui-field-box">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-carousel x-admin-carousel x-admin-backlog" lay-anim="" lay-indicator="inside"
                                 lay-arrow="none" style="width: 1000px; height: 550px;">
                                <div carousel-item="">
                                    <ul class="layui-row layui-col-space10 layui-this">
                                        <a href="javascript:;" class="x-admin-backlog-body">
                                            <h3>您的id号</h3>
                                                    <p><cite id="stuId">这里显示用户的id号码</cite></p>
                                            <a onClick="x_admin_show('修改密码','../html/changeStuPwd.html')"><button class="layui-btn layui-btn-danger" >
                                                <i class="layui-icon">修改密码&#xe642;</i></button></a>
                                            <br>
                                        </a>
                                        <br>

                                        <a href="javascript:;" class="x-admin-backlog-body">
                                            <h3>您的用户名</h3>
                                            <p><cite id="stuName">这里显示用户的用户名</cite></p>
                                            <a onClick="x_admin_show('修改用户名','../html/changeStuUname.html')"><button class="layui-btn layui-btn-danger">
                                                <i class="layui-icon">修改用户名&#xe642;</i></button></a>
                                            <br>
                                        </a>
                                        <br>

                                        <a href="javascript:;" class="x-admin-backlog-body">
                                            <h3>您当前所属的专业</h3>
                                            <p><cite id="stuDl">这里调用获取数据库专业的接口</cite></p>
                                            <a onClick="x_admin_show('修改专业','../html/changeStuDiscipline.html')"><button class="layui-btn layui-btn-danger">
                                                <i class="layui-icon">修改专业&#xe642;</i></button></a>
                                            <br>
                                        </a>
                                        <br>

                                        <a href="javascript:;" class="x-admin-backlog-body">
                                            <h3>您所属的年级</h3>
                                            <p><cite id="stuGrade">这里调用获取数据库年级的接口</cite></p>
                                            <a onClick="x_admin_show('修改年级','../html/changeStuGrade.html')"><button class="layui-btn layui-btn-danger">
                                                <i class="layui-icon">修改年级&#xe642;</i></button></a>
                                            <br>
                                        </a>
                                        <br>

                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </fieldset>
    </div>
    <script type="text/javascript">
            var id=sessionStorage.getItem("stuId");
            console.log(id);
            document.getElementById("time").innerHTML=new Date();
            $.ajax({
                url: "/student/getinfo",
                type : "post",
                async: false,
                dataType: "json",
                data :{ stuNo: id},
                // contentType: "application/json",
                success: function (data) {
                    console.log("请求成功");
                    console.log(data);
                    document.getElementById("stuNameWel").innerHTML=data.stuName;
                    document.getElementById("stuName").innerHTML=data.stuName;
                    document.getElementById("stuId").innerHTML=data.stuNo;
                    document.getElementById("stuGrade").innerHTML=data.stuGrade;
                    document.getElementById("stuDl").innerHTML=data.stuDiscipline;
                    return;
                },
                error: function (data) {
                    console.log("请求失败");

                    return;
                }
            });
    </script>
    </body>
</html>